//
//  PayTypeTableViewCell.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/15.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "PayTypeTableViewCell.h"

@implementation PayTypeTableViewCell{
    GLGWImageView * payIconImageView;
    GLGWLabel * checkPayLabel;
    GLGWButton * selectBut;
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        payIconImageView = [[GLGWImageView alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(15), kHeightProportion_In_iPhoneTriploid(10), kWidthProportion_In_iPhoneTriploid(30), kHeightProportion_In_iPhoneTriploid(30)) inSuperView:self];
        payIconImageView.backgroundColor = kRandomColor;
        //
        checkPayLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(kX_With_View(payIconImageView, 30), kHeightProportion_In_iPhoneTriploid(15), kWidthProportion_In_iPhoneTriploid(80), kHeightProportion_In_iPhoneTriploid(20)) theFont:SYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:self];
        checkPayLabel.text = @"微信支付";
        //
        selectBut = [[GLGWButton alloc] initInSuperView:self.contentView];
        selectBut.backgroundColor = kRandomColor;
        [selectBut mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.contentView);
            make.right.equalTo(self.contentView.mas_right).offset(-kWidthProportion_In_iPhoneTriploid(15));
            make.width.equalTo(@(kWidthProportion_In_iPhoneTriploid(20)));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(20)));
        }];
        
    }
    return self;
}

-(void)setIsSelect:(BOOL)isSelect{
    _isSelect = isSelect;
    selectBut.selected = _isSelect;
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
